/**
 * 
 */
package fr.ece.ing4.montecarlo.client;

import java.math.BigDecimal;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;

import fr.ece.ing4.montecarlo.compute.Compute;




/**
 * @author enzo
 *
 */
public class ComputeStandardOption {
	 public static void main(String args[]) {
	        if (System.getSecurityManager() == null) {
	            System.setSecurityManager(new SecurityManager());
	        }
	        try {
	            String name = "Compute";
	            Registry registry = LocateRegistry.getRegistry(args[0]);
	            Compute comp = (Compute) registry.lookup(name);
	            MonteCarloSimulation task = new MonteCarloSimulation("c",40.0,50.0,0.06,0.5,0.10,0.45,168,100000);
	            Double result = comp.executeTask(task);
	            System.out.println("result " + result.doubleValue());
	        } catch (Exception e) {
	            System.err.println("Compute exception:");
	            e.printStackTrace();
	        }
	    }    

}
